from pydantic import BaseModel, Field


class NamedEntityCreateModel(BaseModel):
    name: str = Field(
        title="命名实体名称", max_length=128
    )
    description: str | None = Field(
        default=None, title="命名实体的描述", max_length=1024
    )
    type: str | None = Field(
        default=None, title="命名实体的类型", max_length=128
    )

class NamedEntityDeleteModel(BaseModel):
    id: int | None = None

class NamedEntityUpdatenameModel(BaseModel):
    id: int | None = None
    newname: str | None = None

class NamedEntityUpdatedescripModel(BaseModel):
    id: int | None = None
    newdescription: str | None = None

class NamedEntityUpdatetypeModel(BaseModel):
    id: int | None = None
    newtype: str | None = None